﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Coding4Fun.Phone.Controls;

namespace Liuyi.Phone.LiveMSN
{
    public partial class UCBackControl : UserControl
    {
        /// <summary>
        /// ___WebBrowser_msn
        /// </summary>
        /// 我的字段 LIUYI-PC Liuyi 2012/1/9 创建
        private WebBrowser ___WebBrowser_msn;
        private Coding4Fun.Phone.Controls.MessagePrompt mp;

        public UCBackControl(MessagePrompt mp, WebBrowser ___WebBrowser_msn)
        {
            // TODO: Complete member initialization
            InitializeComponent();
            //
            this.mp = mp;
            //
            this.___WebBrowser_msn = ___WebBrowser_msn;
        }

        /// <summary>
        /// Handles the Click event of the ___Button_msn control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        /// Control event handler LIUYI-PC Liuyi 2012/1/9 创建
        private void ___Button_msn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            // TODO: Add event handler implementation here.
            Liuyi.do_NavigateToHome(___WebBrowser_msn);
            mp.Hide();
        }

        /// <summary>
        /// Handles the Click event of the ___Button_exit control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        /// Control event handler LIUYI-PC Liuyi 2012/1/9 创建
        private void ___Button_exit_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            // TODO: Add event handler implementation here.
            Liuyi.Exit();
        }

        /// <summary>
        /// Handles the Click event of the ___Button_back control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param>
        /// Control event handler LIUYI-PC Liuyi 2012/1/9 创建
        private void ___Button_back_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            // TODO: Add event handler implementation here.
            Liuyi.do_WebBack(___WebBrowser_msn);
            mp.Hide();
        }
    }
}